﻿@using System.Collections.Generic;
@model List<XPressify.Models.Friend>

<div>
<table border="0">
<tr>
    <th width="50px"></th>
    <th></th>
    <th></th>
</tr>

@foreach (var allFriend in Model)
{
    <tr>
        <td >
            <a href='@Url.Action("ProfileView", "Profile", new { id = allFriend.Id })' class="nobtn">
                <img src= "@allFriend.ProfilePicturePath" alt="Profile picture" title="Profile picture" style="width: 50px;height: 50px;" />
            </a>
        </td>
        <td>
            @Html.ActionLink(allFriend.FullName, "ProfileView", "Profile", new { id = allFriend.Id }, new { @class = "nobtn", style="color:blue" })
        </td>
        <td>
            @if (allFriend.ConfirmFriend)
            {
                @Html.ActionLink("Confirm friendship", "ConfirmRelationship", "User", new { Id = allFriend.Id }, new { @class = "abtn" }) 
            }
            else if (allFriend.ConfirmFriend == false && allFriend.AddFriend == true)
            {
                @Html.ActionLink("Add as a friend", "AddFriend", "User", new { Id = allFriend.Id }, new { @class = "abtn" })
            }
        </td>
    </tr>
}
</table>

</div>